﻿@{
    ViewBag.Title = "Body";
}
@model Data.Model.Dictionary 
<form method="post">
@Html.AntiForgeryToken()
<br />
<table cellpadding="0" cellspacing="1" border="0" width="95%" class="formtable">
    <tr>
        <th style="width:80px;">标题：</th>
        <td><input type="text" id="Title" name="Title" class="mytext" value="@Model.Title" validate="empty" maxlength="100" style="width:70%" /></td>
    </tr>
    <tr>
        <th style="width:80px;">唯一代码：</th>
        <td><input type="text" id="Code" name="Code" class="mytext" value="@Model.Code" validate="canempty,ajax" validate_url="CheckCode?id=@Request.QueryString["id"]" maxlength="100" style="width:70%" /></td>
    </tr>
    <tr>
        <th style="width:80px;">值：</th>
        <td><input type="text" id="Values" name="Values" class="mytext" value="@Model.Value" maxlength="100" style="width:70%" /></td>
    </tr>
    <tr>
        <th style="width:80px;">备注：</th>
        <td><textarea id="Note" name="Note" class="mytext" style="width:90%; height:50px;">@Html.Raw(Model.Note)</textarea></td>
    </tr>
    <tr>
        <th style="width:80px;">其它：</th>
        <td><textarea id="Other" name="Other" class="mytext" style="width:90%; height:50px;">@Html.Raw(Model.Other)</textarea></td>
    </tr>
</table>
<div style="width:95%; margin:10px auto 10px auto; text-align:center;">
    <input type="button" class="mybutton" value="添加子项" onclick="window.location='Add'+'@Request.Url.Query';" />
    <input type="button" class="mybutton" value="排序" onclick="sort1();" />
    <input type="submit" class="mybutton" name="Save" value="保存" onclick="return new RoadUI.Validate().validateForm(document.forms[0]);" />
    <input type="submit" class="mybutton" name="Delete" value="删除" onclick="return confirm('您真的要删除该字典项吗?');" />
</div>
</form>
<script type="text/javascript">
    $(function()
    {
        @Html.Raw(ViewBag.Script)
    });
    function sort1()
    {
        window.location = "Sort" + "@Request.Url.Query";
    }
</script>
